//路由
//导入包并且手动安装
import VueRouter from 'vue-router'
//导入路由组件
import home from './components/tabbar/HomeContainer.vue'
import member from './components/tabbar/MemberContainer.vue'
import shopcar from './components/tabbar/ShopcarContainer.vue'
import search from './components/tabbar/SearchContainer.vue'
import news from './components/news/NewsList.vue'
import newsInfo from './components/news/NewsInfo.vue'
import photolist from './components/photos/PhotoList.vue'
import photoinfo from './components/photos/PhotoInfo.vue'
import goodslist from './components/shopping/GoodsList.vue'
import goodsinfo from './components/shopping/GoodsInfo.vue'
import godesc from './components/shopping/godesc.vue'
import gocomment from './components/shopping/gocomment.vue'

//创建路由对象
var router = new VueRouter({
	routes:[
		{path:'/',redirect:'./home'},
		{path:'/home',component:home},
		{path:'/member',component:member},
		{path:'/shoppingCart',component:shopcar},
		{path:'/search',component:search},
		{path:'/home/news',component:news},
		{path:'/home/newsinfo/:id',component:newsInfo},
		{path:'/home/photolist',component:photolist},
		{path:'/home/photolist/photoinfo/:id',component:photoinfo},
		{path:'/home/goodslist',component:goodslist},
		{path:'/home/goodsinfo/:id',component:goodsinfo,name:'goodsinfo'},
		{path:'/home/godesc/:id',component:godesc,name:'godesc'},
		{path:'/home/gocomment/:id',component:gocomment,name:'gocomment'},
	],
	linkActiveClass:'mui-active',//覆盖默认的路由高亮的类  ，默认的类叫做 router-link-active
})
export default router